<?php echo $header; ?>

<div id="content">
<div class="breadcrumb">
  <?php foreach ($breadcrumbs as $breadcrumb) { ?>
  <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
  <?php } ?>
</div>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
  <div class="heading">
    <h1><img src="view/image/module.png" alt="" /> <?php echo $heading_title; ?></h1>
    <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
  </div>
    <div class="content">
        <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
        <table class="form">
            <tr>
                <td><?php echo $entry_status; ?></td>
                <td>
                    <select name="status">
                        <?php if ($status){ ?>
                        	<option value="0"><?php echo $text_disabled; ?></option>
                            <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                        <?php } else { ?>
                        	<option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                            <option value="1"><?php echo $text_enabled; ?></option>
                        <?php } ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td><?php echo $entry_showinstore;?><br><span class="help"><?php echo $entry_showinstore_help;?></span></td>
                <td>
                	<input type="radio" name="ots_showstore" value="0"<?php if($ots_showstore == 0){?> checked="checked"<?php } ?>> <?php echo $text_no;?>
					<input type="radio" name="ots_showstore" value="1"<?php if($ots_showstore == 1){?> checked="checked"<?php } ?>> <?php echo $text_yes;?>
                </td>
            </tr>
            <tr>
                <td><?php echo $entry_layout;?></td>
                <td>
                	<select name="rts_layout">
                        <option value="0"<?php if($rts_layout == 0){?> selected="selected"<?php } ?>><?php echo $text_boxed;?></option>
                        <option value="1"<?php if($rts_layout == 1){?> selected="selected"<?php } ?>><?php echo $text_fullwidth;?></option>
                    </select>
                </td>
            </tr>
            <tr>
                <td><?php echo $entry_bg_texture;?></td>
                <td>
                	<select name="rts_bg_texture">
                    	<?php foreach($textures as $texture_id => $texture_name){ ?>
                        	<option value="<?php echo $texture_id;?>"<?php if($rts_bg_texture == $texture_id){?> selected="selected"<?php } ?>><?php echo $texture_name;?></option>
                        <?php } ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td><?php echo $entry_bg_color;?></td>
                <td><input class="colorselect" name="rts_bg_color" type="text" value="<?php echo $rts_bg_color; ?>" /></td>
            </tr>
            <tr>
                <td><?php echo $entry_topmenu;?></td>
                <td><input class="colorselect" name="ots_topmenu" type="text" value="<?php echo $ots_topmenu; ?>" /></td>
            </tr>
            <tr>
                <td><?php echo $entry_topmenuhover;?></td>
                <td><input class="colorselect" name="ots_topmenuh" type="text" value="<?php echo $ots_topmenuh; ?>" /></td>
            </tr>
            <tr>
                <td><?php echo $entry_color1;?></td>
                <td><input class="colorselect" name="rts_color1" type="text" value="<?php echo $rts_color1; ?>" /></td>
            </tr>
            <tr>
                <td><?php echo $entry_color2;?></td>
                <td><input class="colorselect" name="rts_color2" type="text" value="<?php echo $rts_color2; ?>" /></td>
            </tr>
            <tr>
                <td><?php echo $entry_f_header;?></td>
                <td>
                	<select name="rts_f_header">
                    	<?php foreach($fonts_header as $font_id => $font_name){ ?>
                        	<option value="<?php echo $font_id;?>"<?php if($rts_f_header == $font_id){?> selected="selected"<?php } ?>><?php echo $font_name;?></option>
                        <?php } ?>
                    </select>
                </td>
            </tr>
            <tr>
                <td><?php echo $entry_f_text;?></td>
                <td>
                	<select name="rts_f_text">
                    	<?php foreach($fonts_text as $font_id => $font_name){ ?>
                        	<option value="<?php echo $font_id;?>"<?php if($rts_f_text == $font_id){?> selected="selected"<?php } ?>><?php echo $font_name;?></option>
                        <?php } ?>
                    </select>
                </td>
            </tr>
        </table>
        </form>
    </div>
</div>
<link rel="stylesheet" href="../catalog/view/theme/oceanic/js/colorpicker/css/colorpicker.css" type="text/css" />
<script type="text/javascript" src="../catalog/view/theme/oceanic/js/colorpicker/colorpicker.js"></script>
<script type="text/javascript">
	$('.colorselect').each(function(){
		var Self = $(this);
		
		Self.ColorPicker({
			onSubmit: function(hsb, hex, rgb){
				Self.val(hex);
				Self.ColorPickerHide();
			},
			onBeforeShow: function(){
				$(this).ColorPickerSetColor(this.value);
			},
			onChange: function (hsb, hex, rgb){
				Self.val(hex);
			}
		})
		.bind('keyup', function(){
			$(this).ColorPickerSetColor(this.value);
		});	
	});
</script>
<?php echo $footer; ?>